package command.userComm.userCommand;

import command.Command;
import empty.log.Log;
import empty.users.User;
import model.log.LogModel;
import model.userModel.UserModel;
import server.ServerThread;


public class UserInsertCommand extends Command{
    @Override
    public void excute() {

    }

    @Override
    public void excute(ServerThread st) {
        try {
            Log log = new Log("注册用户", st.getUser().getId());
            new LogModel().insertLogUser(log);
            r = new UserModel().insert((User) o);
        } catch (Exception ex) {
            e = ex;
            throw new RuntimeException(ex);
        }
    }
}
